package com.tcoiss.datafactory.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tcoiss.datafactory.domain.BusTable;
import com.tcoiss.datafactory.domain.BusTableColumn;
import com.tcoiss.datafactory.domain.vo.TablePageVO;
import com.tcoiss.datafactory.domain.vo.TableVO;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 代码生成业务Service接口
 *
 * @author zw
 * @date 2021-04-20
 */
public interface IBusTableService extends IService<BusTable> {

    /**
     * 查询列表
     */
    List<BusTable> queryList(BusTable busTable);

    boolean saveTable(BusTable busTable);

    boolean updateBusTableById(BusTable busTable);

    BusTable getBusTableByName(String tableName);

    Map<String,Object> getBusTableById(Long tableId);

    boolean updateBusTable(BusTable busTable);

    boolean initTable(Long id);

    String importTable(List<TableVO> columns, boolean updateSupport);

    boolean removeTablesByIds(List<Long> asList);

    int syncAddDataByApi(BusTable table, String script, Date updateTime);

    boolean syncTableJg(BusTable table);

    List<TableVO> findList(BusTable busTable);

    int syncAllDataByApi(BusTable table, String script);

    List<Map<String, Object>> queryTableDate(TablePageVO pageVO);

    List<BusTableColumn> getColumns(Long tableId);

    int syncLinkDataByApi(BusTable table, String script, String msgObjectId);

    Integer queryTableCount(TablePageVO pageVO);

    boolean removeByColumnId(Long columnId);

    boolean backInitTable(Long id);
}
